import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Flutter Demo", style: TextStyle(color: Colors.white)),
          backgroundColor: Colors.blue,
        ),
        body: HomePage(),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    // 获取屏幕的宽高
    // final size = MediaQuery.of(context).size;
    return Container(
      // alignment: Alignment.center,
      width: 300,
      height: 300,
      color: Colors.yellow,
      child: Align(alignment: Alignment(-1, 1), child: Text("你好Flutter")),
    );
  }
}
